package com.zzb.valid.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 校验类2
 * @author create by zhouzongbo on 2020/10/27.
 */
@Data
public class ValidatedDTO implements Serializable {

    private static final long serialVersionUID = 5465536819956125302L;

    /**
     * 如果这里不增加 @Valid, 则不会校验ValidDTO类中的参数.
     */
    @NotNull(message = "不能为空")
    @Valid
    private ValidDTO validDTO;
}
